package com.scalar.chiptrack.sales.forms;


import javax.servlet.http.HttpServletRequest;

import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionMapping;

import com.scalar.chiptrack.ChipTrackActionForm;

/**
 * Form bean for the customer_setup page.  This form has the following fields,
 * with default values in square brackets:
 * <ul>
 * <li><b>action</b> - The maintenance action we are performing (Create. Modify & Save).
 * </ul>
 *
 * @author Kesava Kumar Achanala
 * @version $Revision: 1.2 $ $Date: 2010/05/24 14:37:25 $
 */




public final class AddressForm extends ChipTrackActionForm  {


    // --------------------------------------------------- Instance Variables


    private String action = null;
    
    private String address1 = null;
    private String address2 = null;
    private String city = null;
    private String state = null;
    private String zipCode = null;
    private String country = null;
    private String phoneNumber = null;
    private String faxNumber = null;
    private String email = null;
    private String contactPerson = null;
    private String cellNumber = null;
	private String address3 = null;
	private String address4 = null;
	private String tagName = null;
    //added by varma(24jun2004)
    private boolean salesAckMail = false;
    private boolean shipAlerts = false;
    private boolean proformaInvoice = false;
    private boolean packingSlip = false;
    private boolean commerInvoice = false;
    
	
    // ----------------------------------------------------------- Properties

    
  public String getAddress1()
  {
      return address1;
  }
  
  public void setAddress1(String address1)
  {
      this.address1 = address1;
  }
  
  public String getAddress2()
  {
      return address2;
  }
  
  public void setAddress2(String address2)
  {
      this.address2 = address2;
  }
  
  public String getAddress3()
   {
	   return address3;
   }
   //Added by Sarada on 16th March 2004
   public void setAddress3(String address3)
   {
	   this.address3 = address3;
   }
  
   public String getAddress4()
   {
	   return address4;
   }
  
   public void setAddress4(String address4)
   {
	   this.address4 = address4;
   }
  
  
  public String getCity()
  {
      return city;
  }
  
  public void setCity(String city)
  {
      this.city = city;
  }
  
  public String getState()
  {
      return state;
  }
  
  public void setState(String state)
  {
      this.state = state;
  }
  
  public String getZipCode()
  {
      return zipCode;
  }
  
  public void setZipCode(String zipCode)
  {
      this.zipCode = zipCode;
  }
  
  public String getCountry()
  {
      return country;
  }
  
  public void setCountry(String country)
  {
      this.country = country;
  }

  public String getPhoneNumber()
  {
      return phoneNumber;
  }
  
  public void setPhoneNumber(String phoneNumber)
  {
      this.phoneNumber = phoneNumber;
  }
  
  public String getFaxNumber()
  {
      return faxNumber;
  }
  
  public void setFaxNumber(String faxNumber)
  {
      this.faxNumber = faxNumber;
  }
  
  public String getEmail()
  {
      return email;
  }
  
  public void setEmail(String email)
  {
      this.email = email;
  }
  //Added by sarada on 26th Jan 2004 to show contact person in address details
  public String getContactPerson()
  {
      return contactPerson;
  }
  
  public void setContactPerson(String contactPerson)
  {
      this.contactPerson = contactPerson;
  }
  public String getCellNumber()
  {
	 return cellNumber;
  }

  public void setCellNumber(String cellNumber)
  {
	 this.cellNumber = cellNumber;
  }

  //Added by varma(24jun2004)
  public boolean getSalesAckMail()
   {
       return salesAckMail;
   }
   public void setSalesAckMail(boolean salesAckMail)
   {
       this.salesAckMail = salesAckMail;
   }
   public boolean getShipAlerts()
   {
       return shipAlerts;
   }
   public void setShipAlerts(boolean shipAlerts)
   {
       this.shipAlerts = shipAlerts;
   }
   public boolean getproformaInvoice()
   {
       return proformaInvoice;
   }
   public void setproformaInvoice(boolean proformaInvoice)
   {
       this.proformaInvoice = proformaInvoice;
   }
   public boolean getpackingSlip()
   {
       return packingSlip;
   }
   public void setpackingSlip(boolean packingSlip)
   {
       this.packingSlip = packingSlip;
   }

   public boolean getcommerInvoice()
   {
       return commerInvoice;
   }
   public void setcommerInvoice(boolean commerInvoice)
   {
       this.commerInvoice = commerInvoice;
   }
   //till here

  /**
    * Get action
    *
    * @return action
    */
   public String getAction()
   {
	   return action;
   }

   /**
    * Set the action
    *
    * @param action
    */
   public void setAction(String action)
   {
 	this.action = action;
   }

	public String getTagName() {
		return tagName;
	}

	public void setTagName(String tagName) {
		this.tagName = tagName;
	}

	// --------------------------------------------------------- Public Methods


    /**
     * Reset all properties to their default values.
     *
     * @param mapping The mapping used to select this instance
     * @param request The servlet request we are processing
     */
    public void reset(ActionMapping mapping, HttpServletRequest request) {

		

    }


    /**
     * Validate the properties that have been set from this HTTP request,
     * and return an <code>ActionErrors</code> object that encapsulates any
     * validation errors that have been found.  If no errors are found, return
     * <code>null</code> or an <code>ActionErrors</code> object with no
     * recorded error messages.
     *
     * @param mapping The mapping used to select this instance
     * @param request The servlet request we are processing
     */
    public ActionErrors validate(ActionMapping mapping,
                                 HttpServletRequest request) {

        ActionErrors errors = new ActionErrors();

        //if ((vendorName == null) || (vendorName.length() < 1))
        //    errors.add("Vendor", new ActionError("error.vendor name.required"));

        return errors;

    }


}
